home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-15 / clkt201s.zip / CLKTIMER.DOC < prev   
Text File  |  1992-09-08  |  17KB  |  347 lines

  1.      CLKTIMER - Clock and task performing TSR (v2.01s)
  2.                 Copyright 1992 by Roger Brook
  3.  
  4.      MEMORY REQUIREMENT: less than 5K bytes
  5.  
  6.      INTERRUPT VECTORS ATTACHED: 09h, 1Ch, 21h, 22h, 66h
  7.  
  8.      PURPOSE: A TSR to perform tasks at designated times.  Tasks that can
  9.               be performed include displaying the current time (and
  10.               optionally date) in the upper right hand corner of the
  11.               screen, sounding and displaying an alarm in the upper left
  12.               hand corner of the screen, rebooting the computer, and
  13.               forcing keystrokes into the keystroke buffer to start or
  14.               terminate a DOS program.
  15.  
  16.               Keystroke tasks (a sequence of keystrokes) can be performed
  17.               at a set time, each hour at a specified number of minutes
  18.               after the hour, or after the computer has been idle for a
  19.               specified number of seconds.
  20.  
  21.               CLKTIMER is intended to used in a batch file to set up a
  22.               sequence of tasks to be performed on an unattended basis.
  23.               CLKTIMER can be run anytime, with new tasks added to the list
  24.               of tasks to be performed, or old tasks disabled.
  25.  
  26.      SYNTAX:  CLKTIMER /[a,b,c,d,i,r,x][d] [nn[:nn]] [string]
  27.  
  28.               The slash is interpreted as the start of another delimited
  29.               argument on the command line; therefore every argument must
  30.               begin with a slash.  The square brackets in the syntax line
  31.               above denote optional parameters, and should not be used as a
  32.               part of the arguments.  Recognized arguments are listed
  33.               below.  Any unrecognized argument will cause the program to
  34.               display a help screen of information similar to this syntax
  35.               section.
  36.  
  37.               Recognized arguments which must follow immediately after the
  38.               slash are (case not significant):
  39.  
  40.                    a = set alarm time and message
  41.                        can set only one time for each of 24 hours per day;
  42.                        alarm will both chime and display the specified
  43.                        message; chime will end when the next key is pressed
  44.                        by the user; message displayed for one minute.
  45.  
  46.                    b = set reboot time
  47.                        can set only one time for each of 24 hours per day;
  48.                        computer will reboot at the beginning of the minute
  49.                        of the hour specified; it is not sensitive to
  50.                        whatever is happening (i.e. ignorant of any user).
  51.  
  52.                    c = set clock only display
  53.                        will disable date display if it was previously set;
  54.                        display is in reverse video in the upper right hand
  55.                        corner of the screen
  56.  
  57.                    d = set clock and date display
  58.                        will override clock only display if it was
  59.                        previously set; display is in reverse video in the
  60.                        upper right hand corner of the screen
  61.  
  62.                    h = toggle chime for sounding the hour; if set to sound
  63.                        chime at the beginning of each hour, the chime will
  64.                        be disabled; if the chime was disabled (default) it
  65.                        will be set to chime at the beginning of each hour
  66.  
  67.                    i = set idle time (seconds) and command
  68.                        idle time count is reset for each key pressed by the
  69.                        user; this task is aware of the user and will not
  70.                        interrupt or interfere with any DOS program
  71.  
  72.                    r = set repeat time (minutes after the hour) and command
  73.                        can set only one time for the task to be repeated
  74.                        each hour; this task is aware of the user and will
  75.                        not interrupt or interfere with any DOS program;
  76.                        task will be skipped if a DOS program is active at
  77.                        the beginning of the minute specified (DOS aware
  78.                        added for version 2.01s; not true for version 2.0s)
  79.  
  80.                    s = display the current task settings
  81.  
  82.                    x = set execute time and command
  83.                        can set only one time for each of 24 hours per day;
  84.                        this task is aware of the user and will not
  85.                        interrupt or interfere with any DOS program; task
  86.                        will be skipped if a DOS program is active at the
  87.                        beginning of the minute of the hour specified
  88.  
  89.               Specifying the time is done in a 24 hour format for alarm
  90.               times, reboot times and time to execute a task, and uses two
  91.               number separated by a colon ( : ); a zero will be assumed if
  92.               the number of minutes is not specified.  For the repeat time
  93.               (minutes after the hour) and the idle time (number of
  94.               seconds) only a single number is used.  Hours must be in the
  95.               range [0..23], minutes and seconds must be in the range
  96.               [0..59].  A blank in the time specification will be assumed
  97.               to be a zero.
  98.  
  99.               The command string or alarm display string are after the time
  100.               specification for the argument.  The string is generally a
  101.               combination of text delimited by quote marks ( ' ) and
  102.               representations of special keystrokes.  Special keystrokes
  103.               include any decimal ASCII representation of a keystroke (for
  104.               example the carriage return or enter key is 013), or a scan
  105.               code which begins with the at sign ( @ ).  Scan codes are not
  106.               tested for accuracy, only inserted into the keystroke buffer.
  107.               Therefore, extended keyboard scan codes can be used if your
  108.               computer recognized an extended keyboard.  Since the keyboard
  109.               buffer is manipulated directly, there can be a maximum of 16
  110.               keystrokes specified.
  111.  
  112.               An argument can be used to disable as task by putting the
  113.               letter  d  immediately after the argument letter.  Even
  114.               though the task is turned off, the associated string remains
  115.               as specified.  For example:
  116.  
  117.                CLKTIMER /a 12:00 'LUNCH TIME'     set an alarm for 12:00
  118.                                                   (noon) to display the
  119.                                                   message LUNCH TIME
  120.  
  121.                CLKTIMER /ad 12:00                 disable the alarm
  122.                                                   previously set for 12:00,
  123.                                                   but keep the same display
  124.                                                   string
  125.               The first time the program is run, the task settings
  126.               specified are loaded with the TSR version of the program.  If
  127.               the program is already loaded, then the arguments will modify
  128.               the task settings of the TSR version of the program (i.e.
  129.               will change the memory resident data storage).
  130.  
  131.      DEFAULTS:
  132.               a     time defaults to 00:00
  133.                     display defaults to a null string or previous setting
  134.                     there are no alarms set initially
  135.  
  136.               b     reboot time defaults to 00:00
  137.                     there are not reboot times set initially
  138.  
  139.               c     clock display defaults to off
  140.  
  141.               d     date and clock display defaults to off
  142.  
  143.               h     hour chime defaults to off (not sounded)
  144.  
  145.               i     time defaults to 300 seconds
  146.                     command defaults to 'C:\IDLE' 013 or previous setting
  147.                     the idler timer defaults to off
  148.  
  149.               r     time defaults to 00 minutes after each hour
  150.                     command defaults to 'C:\REPEAT' 013 or previous setting
  151.                     there is no repeat time set initially
  152.  
  153.               x     time defaults to 00:00
  154.                     command defaults to 'C:\EXECUTE' 013 or previous setting
  155.                     there are no execute times set initially
  156.  
  157.      EXAMPLES:
  158.  
  159.               CLKTIMER /a 16:45 'Clean up time'
  160.                    set an alarm task for 4:45 pm to display  Clean up time
  161.  
  162.               CLKTIMER /b2:59
  163.                    set a task to reboot the computer at 2:59 am
  164.  
  165.               CLKTIMER /c /h
  166.                    set two tasks, one to display the clock in the upper
  167.                    right hand corner of the display (this will disable the
  168.                    date display if previously set) and one to toggle the
  169.                    hour chime (will be turned on if this is the first time
  170.                    CLKTIMER is run)
  171.  
  172.               CLKTIMER /D
  173.                    set a task to display the date and time in the upper
  174.                    right hand corner of the display
  175.  
  176.               CLKTIMER /h
  177.                    toggle the hour chime (turn it on if previously off, or
  178.                    turn it off if previously on)
  179.  
  180.               CLKTIMER /I 60
  181.                    set a task to monitor the idle status of the computer
  182.                    and to start the program C:\IDLE after the computer has
  183.                    been idle for 60 seconds
  184.  
  185.               CLKTIMER /i60 'C:\bat\idle.bat' 013
  186.                    set a task to monitor the idle status of the computer
  187.                    and to start the batch program C:\BAT\IDLE.BAT after the
  188.                    computer has been idle for 60 seconds
  189.  
  190.               CLKTIMER /r55
  191.                    set a task to start the program C:\REPEAT at 55 minutes
  192.                    after every hour (24 hours per day)
  193.  
  194.               CLKTIMER /S
  195.                    display the current status and list of tasks set for the
  196.                    copy of CLKTIMER which is resident in memory (TSR)
  197.  
  198.               CLKTIMER /x9:20 'at9_20' 13
  199.                    set a task that at 9:20 am will start the program AT9_20
  200.                    (the DOS PATH will be searched for the program)
  201.  
  202.               CLKTIMER /d /h /i120 /a12:00'LUNCH TIME' /R2
  203.                    arguments can be concatenated upto the allowed length of
  204.                    the command line (or 256 characters);
  205.                    set a task to display date and time, toggle the hour
  206.                    chime, set a task to monitor the idle status and start
  207.                    the program C:\IDLE after 120 seconds of being idle, set
  208.                    an alarm task to display LUNCH TIME at 12:00 (noon) and
  209.                    set a task to reboot the computer at 2:00 am
  210.  
  211.      CAUTIONS: DOS BIOS calls have been used as much as possible
  212.               to help maintain compatibility with different operating
  213.               system implementations.  The major exception is the direct
  214.               manipulation of the keyboard buffer and getting the time
  215.               information direction from the BIOS data area (changed
  216.               from version 2.0s).
  217.  
  218.               Date information is obtained from DOS when the program is
  219.               first run, and then updated internally.  It should be aware
  220.               of leap years, and varying number of days per month.
  221.  
  222.               The information written to the screen is updated
  223.               approximately once each second.  If it scrolls off the top of
  224.               the screen, wait one second and it should reappear.
  225.  
  226.               Software interrupt 66h is used to communicate between the
  227.               currently running version of the program and the TSR version
  228.               in memory.  This is an arbitrary choice, and can be changed
  229.               in your registered version if you tell me which software
  230.               interrupt you desire to use.
  231.  
  232.               The time, date and alarm information will only be displayed
  233.               for 40 or 80 column text modes (int 10h, modes 0-3 and 7).
  234.               In other screen modes, all other functions (including chimes)
  235.               still work.
  236.  
  237.               Windows 3.0: the reboot feature and the chimes will work when
  238.               Windows is running; there will be no screen display unless
  239.               you have a DOS window running; the function of the keystroke
  240.               buffer under Windows has not been investigated.
  241.  
  242.      UPGRADES: Version 2.01 fixed timer jump error which caused date to be
  243.               incremented after each minute of the first hour of the day;
  244.               changed time routine to get timer information directly from
  245.               BIOS data area instead of using 1Ah interrupt; moved repeat
  246.               code so that it is executed only if DOS is not active
  247.               (as specified in documentation).  31Aug92
  248.  
  249.      DISCLAIMER: The program described above has been tested with MSDOS 3.3
  250.               and MSDOS 5.0, and when running under 4DOS and NDOS using
  251.               several hardware clones.  While it appears to perform
  252.               consistently as described, there is absolutely no guarantee
  253.               that it will do anything.  The author will not be responsible
  254.               for any loss or damages caused through the use of this
  255.               program.  No warranty, express or implied, is provided for
  256.               this software, it's performance, or it's usefulness for a
  257.               particular purpose.
  258.  
  259.               All trademarks mentioned are the property of their respective
  260.               owners.
  261.  
  262.               The program is Copyright 1992 by Roger Brook.
  263.  
  264.               You are encouraged to distribute this program under the
  265.               following conditions:
  266.  
  267.                  - all files contained in the archive or distribution disk
  268.                    must be distributed together in UNMODIFIED form
  269.  
  270.                  - you charge no more than a reasonable fee for copying or
  271.                    subscription, and clearly indicate that payment of such
  272.                    a fee does NOT grant ownership of the program
  273.  
  274.               You may evaluate this program for up to 30 days on a free
  275.               trial basis.  After 30 days, you should register your
  276.               continued use of this program.  The registration fee is $10
  277.               for use on a single computer (please specify disk size
  278.               desired), payable to the author at the address given below.
  279.               Site license requests in writing will be considered.
  280.  
  281.               Realistically, I don't expect to get rich from this effort.
  282.               Registration will get you a copy of the latest version of the
  283.               software, without the registration encouragement blurb.  I
  284.               will listen to and attempt to incorporate suggestions from
  285.               registered users.  If your suggestion is used, you will
  286.               receive a free copy of the updated program.  I will likely
  287.               ignore un-registered free loaders.
  288.  
  289.               Send comments and registration to:
  290.  
  291.                    Roger Brook
  292.                    523 Oakdale Drive
  293.                    Haslett MI 48840
  294.  
  295.               I do have a CompuServe and a Prodigy account, but I do not
  296.               monitor them on a regular basis.  If you want to send
  297.               your comments by electronic mail, sent them to either:
  298.  
  299.                    internet        BROOK@MAILBOX.AGE.MSU.EDU
  300.                    bitnet          BROOK@MSUEGR
  301.  
  302.  
  303. ------------------------------------------------------------------------
  304.  
  305.                 REGISTRATION REQUEST FORM
  306.  
  307.  
  308.      PROGRAM:                        # COPIES:            AMOUNT:
  309.  
  310.      CLKTIMER  ($10 per copy)        _________          $______________
  311.  
  312.           Diskette Type Required:  5-1/4" (360K) ___
  313.  
  314.                                    3-1/2" (720K) ___
  315.  
  316.      TOTAL. . . . . . . . . . . . . . . . . . . . . . . $______________
  317.  
  318.  
  319.      PAYMENT BY:
  320.  
  321.      Check/Money Order No.__________ enclosed for $____________________
  322.  
  323.  
  324.      SHIPPING ADDRESS:
  325.  
  326.      NAME                ______________________________________________
  327.  
  328.      ADDRESS LINE 1      ______________________________________________
  329.  
  330.      ADDRESS LINE 2      ______________________________________________
  331.  
  332.      CITY/STATE/PROVINCE ______________________________________________
  333.  
  334.      COUNTRY/POSTAL CODE ______________________________________________
  335.  
  336.      DAYTIME PHONE       ______________________________________________
  337.  
  338.      FAX PHONE           ______________________________________________
  339.  
  340.      SEND TO:       Roger Brook
  341.                     523 Oakdale Drive
  342.                     Halsett  MI  48840
  343.  
  344. ------------------------------------------------------------------------
  345.  
  346.  
  347.